package spark.network;

import spark.network.protocol.Base;

import java.net.InetSocketAddress;

public class BufferedPacket<PacketType extends Base> {
	private PacketType packet;

	public BufferedPacket(PacketType packet) {
		this.packet = packet;
	}

	@Override
	public boolean equals(Object obj) {
		return
				(obj instanceof Base) &&
				((Base) obj).getPacketId() == packet.getPacketId();
	}

	public PacketType getPacket() {
		return packet;
	}
}
